package com.wehealth.adapter;

import java.util.List;

import com.wehealth.R;
import com.wehealth.dm.DM_HealthSearchList;
import com.wehealth.dm.DM_PlanDay;

import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class Adapter_Health_search_food_item extends BaseAdapter {

	/**
	 * 上下文
	 */
	private Context ctx;
	/**
	 * 列表数据
	 */
	private List<DM_HealthSearchList> theList;
	
	public Adapter_Health_search_food_item(Context ctx,List<DM_HealthSearchList> theList){
		this.ctx = ctx;
		this.theList = theList;
	}

	@Override
	public int getCount() {
		return theList.size();
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int arg0, View convertView, ViewGroup arg2) {
	    Log.d("SIMMON"," getView ");
		View view = LayoutInflater.from(ctx).inflate(R.layout.health_search_list_item2,null);
		TextView news_title = (TextView)view.findViewById(R.id.health_item_Title);
		news_title.setText(theList.get(arg0).getTitle());
		return view;
	}

}